package com.qianzhou.eduCourseBoot.converter;

import com.qianzhou.eduCommon.dto.CourseDTO;
import com.qianzhou.eduCommon.po.Teacher;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface TeacherConverter {
    TeacherConverter INSTANCE = Mappers.getMapper(TeacherConverter.class);

    /**
     * dto 装换为 bo
     */
    @Mappings({
            @Mapping(source = "teacherName", target = "teacherName"),
            @Mapping(source = "position", target = "position"),
            @Mapping(source = "description", target = "description"),
    })
    Teacher dtoConvertPo(CourseDTO dto);
}
